﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Prism.UnityExtensions;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Unity;
using DIST.LR.ZHJG.Silverlight;
using DIST.LR.ZHJG.Pgybc;

namespace DIST.LR.ZHJG.Silverlight
{
    public class PgybczbglBootstrapper:UnityBootstrapper
    {

        protected override DependencyObject CreateShell()
        {
            return Container.Resolve<PgybcZbglShell>();
        }

        //控制页面在初始时显示Shell页面
        protected override void InitializeShell()
        {
            base.InitializeShell();
            App.Current.RootVisual = (UIElement)this.Shell;
        }

        //注册Module，在实际开发中可以使用xaml做配置文件
        protected override void ConfigureModuleCatalog()
        {
            base.ConfigureModuleCatalog();

            Type banner=typeof(DIST.LR.ZHJG.Navigation.ZbglNavigationModel);
            ModuleInfo module_View = new ModuleInfo 
            {
                ModuleName=banner.Name,
                ModuleType=banner.AssemblyQualifiedName,
            };

            this.ModuleCatalog.AddModule(module_View);

            Type summary=typeof(DIST.LR.ZHJG.Pgybc.ZbglModule);
            ModuleInfo module_summery = new ModuleInfo 
            {
                ModuleName=summary.Name,
                ModuleType=summary.AssemblyQualifiedName,
            };

            this.ModuleCatalog.AddModule(module_summery);
        }

        //注册服务（类）
        protected override void ConfigureContainer()
        {
            base.ConfigureContainer();
        }
    }
}
